-
Notifications
You must be signed in to change notification settings - Fork 225
Chore: Improve array contains test coverage #2030
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Chore: Improve array contains test coverage #2030
Conversation
@@ -218,7 +218,7 @@ class CometArrayExpressionSuite extends CometTestBase with AdaptiveSparkPlanHelp | |||
} | |||
} | |||
|
|||
test("array_contains") { | |||
test("array_contains - int values") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would comment that INTs are in separate tests as ints require incompatible flag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, I forgot to disable this setting.
checkSparkAnswerAndOperator( | ||
sql(s"SELECT array_contains(cast(null as array<$typeName>), b) FROM t2")) | ||
checkSparkAnswerAndOperator(sql( | ||
s"SELECT array_contains(cast(array() as array<$typeName>), cast(null as $typeName)) FROM t2")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
array literals might wait for #1977
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The literals are now in a dedicated test marked for exclusion ("ignored")
related to #1929 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2030 +/- ##
============================================
+ Coverage 56.12% 58.66% +2.54%
- Complexity 976 1252 +276
============================================
Files 119 134 +15
Lines 11743 13111 +1368
Branches 2251 2401 +150
============================================
+ Hits 6591 7692 +1101
- Misses 4012 4179 +167
- Partials 1140 1240 +100 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…rage' into improve_array_contains_test_coverage
@@ -136,7 +136,7 @@ object CometArrayAppend extends CometExpressionSerde with IncompatExpr { | |||
} | |||
} | |||
|
|||
object CometArrayContains extends CometExpressionSerde with IncompatExpr { | |||
object CometArrayContains extends CometExpressionSerde { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @andygrove as Andy introduced IncompatExpr
trait here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @kazantsev-maksim I think it is LGTM just waiting for @andygrove to confirm the IncompatExpr
trait can be safely removed
Which issue does this PR close?
Part of: #1902
Rationale for this change
Part of: #1902
What changes are included in this PR?
How are these changes tested?
Add more unit tests